<template>
  <div id="loading" class="wrap">
    <div id="loading" class="loading">
      <img data-v-6d507009="" src="../assets/loding.png" alt="Loading" class="rotation" />
    </div>
  </div>
</template>
<script>
export default {
  setup(props, content) {
    function setWxerwma() {
      const s = document.createElement('script')
      s.type = 'text/javascript'
      s.src = 'https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js'
      const wxElement = document.body.appendChild(s)
      wxElement.onload = function () {
        let obj = new WxLogin({
          id: '', // 需要显示的容器id
          appid: '', // 公众号appid wx*******
          scope: 'snsapi_login', // 网页默认即可
          redirect_uri: encodeURIComponent(''), // 授权成功后回调的url
          state: Math.ceil(Math.random() * 1000), // 可设置为简单的随机数加session用来校验
          style: 'black', // 提供"black"、"white"可选。二维码的样式
          href: '', // 外部css文件url，需要https
        })
      }
    }
    return {
      setWxerwma
    }
  },
}
</script>
<style scoped>
.wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-color: #06384d;
}
.loading {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translate(-50%, 0);
  text-align: center;
  font-size: 2rem;
}
.loading img {
  width: 200px;
  height: 200px;
}
@keyframes rotation {
  0% {
    -webkit-transform: rotate(0deg);
  }

  to {
    -webkit-transform: rotate(1turn);
  }
}

.rotation {
  width: 100px;
  height: 100px;
  transform: rotate(1turn);
  animation: rotation 2s linear infinite;
}
</style>
<route>
{
  meta:{
    title:'首页',
    keepAlive:true
  }
}
</route>
